from rest_framework import serializers

class UserSerializer(serializers.Serializer):
    name = serializers.CharField(required=True, max_length=32, min_length=2)
    address = serializers.CharField(max_length=256, allow_blank=True)
    phone = serializers.CharField(required=True, max_length=15, min_length=11)
    email = serializers.EmailField(required=True, max_length=32, min_length=3)